// 统一的默认配置模块
// 这个文件包含所有默认配置参数，前端和后端都应该使用这里定义的默认值

const defaultConfig = {
  // 基本服务器设置
  hostname: 'EXAMPLE NAME',
  password: '',
  passwordAdmin: '',
  description: '',
  enableWhitelist: 0,
  maxPlayers: 60,
  verifySignatures: 2,
  BattlEye: 0,
  forceSameBuild: 1,
  disableVoN: 0,
  vonCodecQuality: 20,
  shardId: '123abc',
  // 访问控制配置
  disableBanlist: false,
  disablePrioritylist: false,
  
  // 游戏设置
  disable3rdPerson: 0,
  disableCrosshair: 0,
  disablePersonalLight: 1,
  lightingConfig: 1,
  
  // 服务器时间设置
  serverTime: 'SystemTime',
  serverTimeAcceleration: 12,
  serverNightTimeAcceleration: 4,
  serverTimePersistent: 1,
  
  // 登录和实例设置
  guaranteedUpdates: 1,
  loginQueueConcurrentPlayers: 5,
  loginQueueMaxPlayers: 500,
  instanceId: 1,
  storageAutoFix: 1,
  storeHouseStateDisabled: false,
  
  // 游戏机制设置
  respawnTime: 5,
  motd: ['欢迎加入游戏', '大家好', '太棒了'],
  motdInterval: 1,
  timeStampFormat: 'Short',
  // 日志设置扩展
  logFile: 'server_console.log',
  enableLog: true,
  logAverageFps: 1,
  logMemory: 1,
  logPlayers: 1,
  
  // 路径配置
  modsDirectory: '/mods',
  serverPath: '../DayZServer', // 统一使用相对路径
  serverExe: 'DayZServer_x64.exe',
  serverPort: 2302,
  serverCfgPath: 'serverDZ.cfg',
  profilesPath: 'profiles',
  battleyePath: 'battleye',
  // 网络与连接设置
  steamQueryPort: 2305,
  allowFilePatching: 1,
  clientPort: 2304,
  
  // 服务器控制设置
  rconPassword: '2306',
  doLogs: true,
  adminLog: true,
  netLog: true,
  freezeCheck: true,
  filePatching: true,
  scriptDebug: false,
  scrAllowFileWrite: true,
  limitFPS: 100, // 统一默认值为100
  cpuCount: -1,
  // 管理员日志设置
  adminLogPlayerHitsOnly: 0,
  adminLogPlacement: 0,
  adminLogBuildActions: 0,
  adminLogPlayerList: 0,
  // 安全与反作弊设置
  disableMultiAccountMitigation: false,
  enableDebugMonitor: 0, // 客户端显示角色信息调试窗口（0-1）
  speedhackDetection: 1, // 启用速度黑客检测，值的范围1-10（1严格，10宽松，可以是浮点数）
  shotValidation: 1,
  
  // dayzsetting.xml配置
  dayzsettingpcmaxcores: 4,
  dayzsettingreservedcores: 2,
  dayzsettingglobalqueue: 4096,
  dayzsettingthreadqueue: 1024,
  
  // 任务和模组设置
  missionTemplate: 'dayzOffline.chernarusplus',
  serverLaunchParams: [],
  template: 'dayzOffline.chernarusplus',
  // 性能优化参数
  simulatedPlayersBatch: 20,
  multithreadedReplication: 1,
  
  // 服务器监控设置
  serverProcessPollIntervall: 30000,
  disableStuckCheck: false,
  disableServerMonitoring: false,
  lockServerRestart: false,
  disableServerLockLogs: false,
  experimentalServer: false,
  
  // 备份设置
  backupPath: 'backups',
  backupMaxAge: 7,
  
  // 模组相关
  mods: [],
  addAtPrefix: false, // 将addAtPrefix统一到配置对象中
  
  // 网络范围配置
  networkRangeClose: 20,
  networkRangeNear: 150,
  networkRangeFar: 1000,
  networkRangeDistantEffect: 4000,
  networkObjectBatchLogSlow: 5,
  networkObjectBatchEnforceBandwidthLimits: 1,
  networkObjectBatchUseEstimatedBandwidth: 0,
  networkObjectBatchUseDynamicMaximumBandwidth: 1,
  networkObjectBatchBandwidthLimit: 0.8,
  networkObjectBatchCompute: 1000,
  networkObjectBatchSendCreate: 10,
  networkObjectBatchSendDelete: 10,
  
  // 渲染距离设置
  defaultVisibility: 1375,
  defaultObjectViewDistance: 1375,
  
  // 延迟与FPS设置
  pingWarning: 200,
  pingCritical: 250,
  maxPing: 300,
  serverFpsWarning: 15,
  
  // 其他设置
  disableBaseDamage: 0,
  disableContainerDamage: 0,
  disableRespawnDialog: 0
};

module.exports = {
  defaultConfig
};
